package com.itheima.demo03;

import java.util.ArrayList;

public class Test01 {
    public static void main(String[] args) {
        //
        ArrayList<Student> list = new ArrayList<>();

        Student s1 = new Student("张三",20,"男");
        Student s2 = new Student("李四",23,"女");
        Student s3 = new Student("王五",25,"男");
        Student s4 = new Student("王五",26,"男");

        list.add(s1);
        list.add(s2);
        list.add(s3);
        list.add(s4);


        int maxAge = StudentUtil.getMaxAge(list);
        System.out.println(maxAge);

    }
}
